const App = {
    // mixins: [Query],//配置文件，路径/utils/mixins.js
    data() {
        return {
            photo,
            Data: [],
            fileUrl:'',
            showDialog:false,
        }
    },
    mounted() {
        let ls_URL = window.location.href;
        let Asset_SerialNumber = getQueryObject(ls_URL, "Asset_SerialNumber");// 获取 nodeKey 参数
        this.handleShow(Asset_SerialNumber);
    },
    methods: {
        xinwenjilu(row){
            window.location.href = './news.html?nodeKey=' + row.Asset_Change_SerialNumber
        },
        handleShow(Asset_SerialNumber) {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryBySQLSerialNumber`,
                method: "post",
                data: {
                    SQLSerialNumber: "f_asset_change",
                    Condition: window.btoa(unescape(encodeURIComponent("%" + Asset_SerialNumber + "%"))),
                },
                success: (res) => {

                    this.Data = res;
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
        },
        preview(row) {
            this.fileUrl = photo + row.Attachment;
            this.showDialog = true;
        },
        xinwen(row) {
            window.location.href = '../../news_videos_files/news/add.html?action=Add&News_Category_SerialNumber=NC0000000000079&Party_Organization_Activity_SerialNumber=' + row.Asset_Change_SerialNumber
            +'&Village_SerialNumber=' + row.Village_SerialNumber
        },
        goBack() {
            window.history.back();
        },
    },
};

const { createApp } = Vue;
const app = createApp(App);
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.component('yl-online-preview', ylOnlinePreview);
const ElMessage = ElementPlus.ElMessage;
app.use(ElementPlus, { locale: zhCn });
app.mount("#app");
